<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition 
    template="/template/templatePadrao.xhtml"
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
    xmlns:p="http://primefaces.org/ui"
    xmlns:f="http://xmlns.jcp.org/jsf/core">
    <ui:define name="conteudoCentro">
        <h:form id="formRasa">
            <p:messages id="mRasa" showDetail="true" showSummary="true"/>
            <p:panel id="imPanelRasa" header="Rasa" style="text-align: center">
                <center>
                    <h:inputHidden
                        id="imIHRasa"
                        value="#{rasaBean.rasa.id}"/>
                    <h:panelGrid id="imGridRasa" columns="2">
                        <h:outputText title="Código de indentificação da rasa (Alfa-numérico)." 
                                      value="Código:"/>
                        <p:inputText
                            id="itCodigoRasa" 
                            value="#{rasaBean.rasa.codigo}"
                            maxlength="11"
                            requiredMessage="Campo obrigatório" 
                            required="true"
                            />
                        <h:outputText value="Complemento:"
                                      title="Informação adicional à critério do cadastrante (Não obrigatório)."
                                      />
                        <p:inputTextarea
                            id="itaRasaComplemento" 
                            maxlength="100"
                            value="#{rasaBean.rasa.complemento}"                      
                            />
                        <h:outputText value="Peso/Capacidade (Kg)"
                                      title="Volume ou capacidade da rasa, em quilogramas"/>
                        <p:inputText
                            id="itLongitude" 
                            value="#{rasaBean.rasa.peso}"
                            />

                    </h:panelGrid>
                    <p>
                        <p:commandButton
                            id="imSalvar"
                            ajax="false"
                            icon="ui-icon-check"
                            value="Salvar"
                            update="formRasa"
                            action="#{rasaBean.salvar()}"/>
                        <p:button
                            id="imCancelar"
                            icon="ui-icon-closethick"
                            value="Cancelar"
                            href="/sistema/inicio.jsf"
                            />
                    </p>
                </center>
            </p:panel>
        </h:form>
    </ui:define>
</ui:composition>

